/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/*************************************************************************
 *\author: starlove
 *************************************************************************/
#ifndef __CC_PYTHON_IMPORT_O_SPRITEBATCHNODE__
#define __CC_PYTHON_IMPORT_O_SPRITEBATCHNODE__

#include <cocos2d.h>
#include "python_object_nodeobjects.h"

NS_CCPY_BEGIN
	CC_OBJECT_WRAPPER_DEF_BEGIN(CCSpriteBatchNode)
	CCNODE_OBJECT_WRAPPER_DEF_METHODS(CCSpriteBatchNode)
    void g_insertQuadFromSprite(cocos2d::CCSprite *sprite, unsigned int index);
    void g_updateQuadFromSprite(cocos2d::CCSprite *sprite, unsigned int index);
    cocos2d::CCSpriteBatchNode * g_addSpriteWithoutQuad(cocos2d::CCSprite*child, unsigned int z, int aTag);
    cocos2d::CCTextureAtlas *get_m_pobTextureAtlas();
    void set_m_pobTextureAtlas(cocos2d::CCTextureAtlas *);
    cocos2d::ccBlendFunc get_m_blendFunc();
	void set_m_blendFunc(cocos2d::ccBlendFunc);
    cocos2d::CCArray* get_m_pobDescendants();
	void set_m_pobDescendants(cocos2d::CCArray* );
	CC_OBJECT_WRAPPER_DEF_END

	class CPySpriteBatchNode : public CPyCCObject
	{
	PYCLASS_DEF_INTERFACE(CPySpriteBatchNode)
	public:
		CPySpriteBatchNode();
		PYCLASS_GETSET_MAPPING_DEF(CPySpriteBatchNode, TextureAtlas);
		PYCLASS_GET_DEF(CPySpriteBatchNode, Descendants);

		PYCLASS_METHOD_DEF(CPySpriteBatchNode, initWithTexture);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, initWithFile);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, increaseAtlasCapacity);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, removeChildAtIndex);

		PYCLASS_METHOD_DEF(CPySpriteBatchNode, insertChild);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, appendChild);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, removeSpriteFromAtlas);

		PYCLASS_METHOD_DEF(CPySpriteBatchNode, rebuildIndexInOrder);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, highestAtlasIndexInChild);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, lowestAtlasIndexInChild);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, atlasIndexForChild);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, reorderBatch);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, _insertQuadFromSprite);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, _updateQuadFromSprite);
		PYCLASS_METHOD_DEF(CPySpriteBatchNode, _addSpriteWithoutQuad);
	};
NS_CCPY_END

#endif